var mongoose = require('mongoose');
var mongoosePaginate =require('mongoose-paginate');
var Schema = mongoose.Schema;
var ClassSchema = new Schema({
  'campus' :String,
  'major' :Array,
  'majorId' :String,
  'class' : String,
  'intake' :String,
  'majorName' : {type: Schema.Types.ObjectId, ref: 'major'}
});

// 分页
ClassSchema.plugin(mongoosePaginate);

module.exports = mongoose.model('classes', ClassSchema);